<%-- 
    Document   : pregled
    Created on : Dec 10, 2009, 4:59:59 PM
    Author     : Milan Boricic <boricic@gmail.com>
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<h:form>
    <h:messages/>
    <h:dataTable value="#{rezervacija.rezervacijeByKorisnik}"
             var="rezrvacijaItem"
             styleClass="stats">
    <h:column>
        <f:facet name="header">
            <f:verbatim>Naziv</f:verbatim>
        </f:facet>
        <h:outputText value="#{rezrvacijaItem.sala.naziv}" style="white-space:nowrap;"/>
    </h:column>
    <h:column>
        <f:facet name="header">
            <f:verbatim>Namena</f:verbatim>
        </f:facet>
        <h:outputText value="#{rezrvacijaItem.namena}" style="white-space:nowrap;"/>
    </h:column>
    <h:column>
        <f:facet name="header">
            <f:verbatim>Datum</f:verbatim>
        </f:facet>
        <h:outputText value="#{rezrvacijaItem.datum}" style="white-space:nowrap;">
            <f:convertDateTime pattern="dd.MM.yyyy." type="date" />
        </h:outputText>
    </h:column>
    <h:column>
        <f:facet name="header">
            <f:verbatim>Početak</f:verbatim>
        </f:facet>
        <h:outputText value="#{rezrvacijaItem.pocevOd}" style="white-space:nowrap;">
            <f:convertDateTime pattern="H:mm" type="time" />
        </h:outputText>
    </h:column>
    <h:column>
        <f:facet name="header">
            <f:verbatim>Trajanje</f:verbatim>
        </f:facet>
        <h:outputText value="#{rezrvacijaItem.trajanje}" style="white-space:nowrap;"/>
    </h:column>
    <h:column>
        <h:commandButton value="Otkaži" action="#{rezrvacijaItem.otkazi}" />
    </h:column>
</h:dataTable>
</h:form>
